<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();
if($_RQ['op']=='get'){
	$type=$_RQ['type'];
	$id=intval($_RQ['id']);
	if($type=='wxapp'){
		$app=pdo_get('core_account_wxapp',array('id'=>$id,'uniacid'=>$_SESSION['uniacid']),array('id','plugin_name','type','title','logo','oldid'));
		if($app['type']==1){
			$path='/core/welcome/index';
		}elseif($app['type']==2){
			$path='/'.$app['plugin_name'].'/index/index';
		}elseif($app['type']==7){
			$path='/pages/index/index';
		}elseif($app['type']==8){
			if($app['plugin_name'] && $app['plugin_name']!='core'){
				$path='/'.$app['plugin_name'].'/index/index';
			}else{
				$path='/core/welcome/index';
			}
		}
		$jump_wxa=array(
			'path'=>$path,
			'query'=>'',
		);
		$getscheme=cfc('wxapp_api',$id)->getscheme($jump_wxa);
	}
	$return['app']=$app;
	$return['jump_wxa']=$jump_wxa;
	$return['getscheme']=$getscheme;
	$return['iswechat']=$_SESSION['container']=='wechat' || $_SESSION['container']=='wxapp'?1:0;
	$return['type']=$type;
	set_html('title','跳转到小程序');
	exi($return);
}
?>